/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.safetytask.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel(value = "用户相关的任务", description = "用户相关的任务")
public class UserTask extends BaseEntity {
    @ApiModelProperty(value = "任务名", name = "taskName", required = true)
    private String taskName;

    @ApiModelProperty(value = "任务描述", name = "taskDesc", required = true)
    private String taskDesc;

    @ApiModelProperty(value = "任务编码", name = "taskCode", required = true)
    private String taskCode;

    @ApiModelProperty(value = "结束时间", name = "deadline", required = true)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date deadline;

    @ApiModelProperty(value = "发起人Code", name = "initiatorId", required = true)
    private String initiatorCode;

    @ApiModelProperty(value = "发起人姓名", name = "initiatorName", required = true)
    private String initiatorName;

    @ApiModelProperty(value = "任务接受人code", name = "receiverCode", required = true)
    private String receiverCode;

    @ApiModelProperty(value = "任务接受人姓名", name = "receiverName", required = true)
    private String receiverName;

    @ApiModelProperty(value = "任务执行人数", name = "receiverNum", required = true)
    private Integer receiverNum;

    @ApiModelProperty(value = "任务参与协助人code", name = "participantCode", required = true)
    private String participantCode;

    @ApiModelProperty(value = "任务参与协助人姓名", name = "participantName", required = true)
    private String participantName;

    @ApiModelProperty(value = "审批人code", name = "approverCode", required = true)
    private String approverCode;

    @ApiModelProperty(value = "审批人姓名", name = "approverName", required = true)
    private String approverName;

    @ApiModelProperty(value = "状态: 0未完成 1进行中 2完成 3未下发(草稿状态，允许指派人员修改任务)", name = "state", required = true)
    private Integer state;

    @ApiModelProperty(value = "附件URL", name = "taskFile", required = true)
    private String taskFile;

    @ApiModelProperty(value = "关联的业务id", name = "businessIds" )
    private String businessIds;

    @ApiModelProperty(value = "关注任务关系id,用于取消关注时", name = "followId" )
    private String followId;

    @ApiModelProperty(value = "任务类型 来着数据字典", name = "followId" )
    private String taskType;

    @ApiModelProperty(value = "抄送人code,存储格式为json", name = "copyPerson" )
    private String copyPerson;

    @ApiModelProperty(value = "抄送人名称，存储格式为json", name = "copyPersonName" )
    private String copyPersonName;

    @ApiModelProperty(value = "自定义表单code", name = "tbaleCode" )
    private String tbaleCode;

    @ApiModelProperty(value = "自定义表单名", name = "tbaleName" )
    private String tbaleName;

    public String getTbaleCode() {
        return tbaleCode;
    }

    public void setTbaleCode(String tbaleCode) {
        this.tbaleCode = tbaleCode;
    }

    public String getTbaleName() {
        return tbaleName;
    }

    public void setTbaleName(String tbaleName) {
        this.tbaleName = tbaleName;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskDesc() {
        return taskDesc;
    }

    public void setTaskDesc(String taskDesc) {
        this.taskDesc = taskDesc;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    public Date getDeadline() {
        return deadline;
    }

    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }

    public String getInitiatorCode() {
        return initiatorCode;
    }

    public void setInitiatorCode(String initiatorCode) {
        this.initiatorCode = initiatorCode;
    }

    public String getInitiatorName() {
        return initiatorName;
    }

    public void setInitiatorName(String initiatorName) {
        this.initiatorName = initiatorName;
    }

    public String getReceiverCode() {
        return receiverCode;
    }

    public void setReceiverCode(String receiverCode) {
        this.receiverCode = receiverCode;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getParticipantCode() {
        return participantCode;
    }

    public void setParticipantCode(String participantCode) {
        this.participantCode = participantCode;
    }

    public String getParticipantName() {
        return participantName;
    }

    public void setParticipantName(String participantName) {
        this.participantName = participantName;
    }

    public String getApproverCode() {
        return approverCode;
    }

    public void setApproverCode(String approverCode) {
        this.approverCode = approverCode;
    }

    public String getApproverName() {
        return approverName;
    }

    public void setApproverName(String approverName) {
        this.approverName = approverName;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getTaskFile() {
        return taskFile;
    }

    public void setTaskFile(String taskFile) {
        this.taskFile = taskFile;
    }

    public String getBusinessIds() {
        return businessIds;
    }

    public void setBusinessIds(String businessIds) {
        this.businessIds = businessIds;
    }

    public String getFollowId() {
        return followId;
    }

    public void setFollowId(String followId) {
        this.followId = followId;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getCopyPerson() {
        return copyPerson;
    }

    public void setCopyPerson(String copyPerson) {
        this.copyPerson = copyPerson;
    }

    public String getCopyPersonName() {
        return copyPersonName;
    }

    public void setCopyPersonName(String copyPersonName) {
        this.copyPersonName = copyPersonName;
    }

    public Integer getReceiverNum() {
        return receiverNum;
    }

    public void setReceiverNum(Integer receiverNum) {
        this.receiverNum = receiverNum;
    }

    @Override
    public String toString() {
        return "UserTask{" +
                "taskName='" + taskName + '\'' +
                ", taskDesc='" + taskDesc + '\'' +
                ", taskCode='" + taskCode + '\'' +
                ", deadline=" + deadline +
                ", initiatorCode='" + initiatorCode + '\'' +
                ", initiatorName='" + initiatorName + '\'' +
                ", receiverCode='" + receiverCode + '\'' +
                ", receiverName='" + receiverName + '\'' +
                ", receiverNum=" + receiverNum +
                ", participantCode='" + participantCode + '\'' +
                ", participantName='" + participantName + '\'' +
                ", approverCode='" + approverCode + '\'' +
                ", approverName='" + approverName + '\'' +
                ", state=" + state +
                ", taskFile='" + taskFile + '\'' +
                ", businessIds='" + businessIds + '\'' +
                ", followId='" + followId + '\'' +
                ", taskType=" + taskType +
                ", copyPerson='" + copyPerson + '\'' +
                ", copyPersonName='" + copyPersonName + '\'' +
                '}';
    }
}
